package com.wx.controller;

import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.stat.DruidDataSourceStatManager;
import com.jfinal.core.Controller;

import java.util.Set;

/**
 * Created by myd on 2016/12/31.
 */
public class MainController extends Controller {
    public void index()
    {
        this.render("index.jsp");
//        Set<DruidDataSource> dataSources = DruidDataSourceStatManager.getDruidDataSourceInstances();
//        this.setAttr("datasource", dataSources);
//        render("data.jsp");
    }

    public void Hello()
    {
        String name = this.getPara("userName");
        String sayHello = "hello"+name;
        this.setAttr("sayhello",sayHello);
        this.render("hello.jsp");
    }
}
